<?php

class IndexController extends Zend_Controller_Action {

   public function init() {
   }

   public function indexAction() {
      $projects = new Application_Model_DbTable_Projects();
      $show_hidden = $this->_getParam('show_hidden', 0);
      $rs = $projects->readAll( $show_hidden );

      // projects pagination
      $page = $this->_getParam('page', 1);

      $paginator = Zend_Paginator::factory($rs);
      $paginator->setCurrentPageNumber($page)
              ->setItemCountPerPage(9);

      Zend_Paginator::setDefaultScrollingStyle();
      Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
      $this->view->assign('paginator', $paginator);
   }

   public function aboutAction() {
      // just show a static page...
   }
}

